package com.applcn.user.client;

import com.applcn.core.base.Result;
import com.applcn.user.UserConstant;
import com.applcn.user.dto.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * com.applcn.user.client
 * Description:
 *
 * @author: 大妖怪
 * @date: 2020-01-16 23:39
 */
@FeignClient(name = UserConstant.SERVICE_NAME, url = "${applcn.user-service-endpoint}", path = "/feign/user")
public interface UserClient {

    /**
     * 解析token
     *
     * @param token
     * @return
     */
    @GetMapping("/resolveToken")
    CreateTokenDTO resolveToken(@RequestParam("token") String token);

    /**
     * 初始化店铺菜单信息
     *
     * @param initShopMenuDTO
     * @return
     */
    @PostMapping("/initShopMenu")
    Result initShopMenu(@RequestBody InitShopMenuDTO initShopMenuDTO);
}
